Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt 2 Make class variables immutable #188

Merged
merged 4 commits into from
Jul 14, 2023

Conversation

WilliamJamieson
Copy link
Contributor

Attempt 2 at #187

@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #188 (9f723f3) into main (70e27a2) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #188   +/-   ##
=======================================
  Coverage   98.63%   98.63%           
=======================================
  Files          55       55           
  Lines        2047     2047           
=======================================
  Hits         2019     2019           
  Misses         28       28           
Impacted Files Coverage Δ
asdf_astropy/converters/coordinates/angle.py 100.00% <100.00%> (ø)
...f_astropy/converters/coordinates/earth_location.py 100.00% <100.00%> (ø)
asdf_astropy/converters/coordinates/frame.py 100.00% <100.00%> (ø)
...f_astropy/converters/coordinates/representation.py 100.00% <100.00%> (ø)
asdf_astropy/converters/coordinates/sky_coord.py 100.00% <100.00%> (ø)
...f_astropy/converters/coordinates/spectral_coord.py 100.00% <100.00%> (ø)
asdf_astropy/converters/fits/fits.py 100.00% <100.00%> (ø)
asdf_astropy/converters/table/table.py 97.77% <100.00%> (ø)
asdf_astropy/converters/time/time.py 100.00% <100.00%> (ø)
asdf_astropy/converters/time/time_delta.py 100.00% <100.00%> (ø)
... and 14 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@braingram braingram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this update! LGTM.

Copy link
Member

@perrygreenfield perrygreenfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than one comment on sets, LGTM. But if this should be the general approach now, we should change the converter examples too in readthedocs.

@@ -34,7 +34,7 @@ def create_magunits():
else:
magunits.append(magunit)

return magunits
return set(magunits)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For immutability shouldn't frozenset() be used?

Copy link
Member

@perrygreenfield perrygreenfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WilliamJamieson WilliamJamieson merged commit 088fad0 into astropy:main Jul 14, 2023
@WilliamJamieson WilliamJamieson deleted the refactor/make_immutable branch July 14, 2023 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants